<?php 
require_once('config.php');
?>

<?php 
//Ausgabe der Spiele in der Datenbank
function getGames() {
	$sql = "SELECT
				a.id, a.game_title, a.game_path, b.game_description, a.bild_path
			FROM
				global_games a, 
				global_games_description b
			WHERE
				a.game_description_id = b.id";
				
	$query = mysql_query($sql);
	
	while($row = mysql_fetch_array($query)) {
		$result[] = $row; 
	}
	
	if(empty($result)) {
		return false;
	} else {
		return $result;
	}
}

?>